/*
 * Copyright
 */
package org.springframework.cloud.netflix.eureka.server;

import java.util.Objects;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 前端界面配置
 *
 * @author ztkool
 * @since 1.0.0
 */
@ConfigurationProperties("eureka.dashboard")
public class EurekaDashboardProperties {

    /**
     * 访问路径
     */
    private String path = "/";

    /**
     * 是否启用前端界面
     */
    private boolean enabled = true;

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        EurekaDashboardProperties that = (EurekaDashboardProperties) o;
        return enabled == that.enabled && Objects.equals(path, that.path);
    }

    @Override
    public int hashCode() {
        return Objects.hash(path, enabled);
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("EurekaDashboardProperties{");
        sb.append("path='").append(path).append('\'');
        sb.append(", enabled=").append(enabled);
        sb.append('}');
        return sb.toString();
    }

}
